package com.example.week1_home01;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

public class ActivityListView extends  AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_thrid);
        String[] data = {"苹果","香蕉","梨子"};
        ArrayAdapter adapter = new ArrayAdapter(ActivityListView.this,android.R.layout.simple_list_item_1);
        ListView lv = findViewById(R.id.fruit_itm_listview);
        lv.setAdapter(adapter);

    }
}
